package com.ITArmy.util;

import com.ITArmy.common.ServerResponse;

public class CheckMessage {
    public ServerResponse getMessage(int resultCount, String successMessage,String errorMesage){
        try {
            if (resultCount < 1) {
                return ServerResponse.createByErrorMesage(errorMesage);
            }
            return ServerResponse.createBySuccessMessage(successMessage);
        } catch (Exception e) {
            return ServerResponse.createByErrorMesage(errorMesage);
        }
    }

}
